package com.handong.handdemo.entitiss;

/**
 * 脚环应答。
 * Created by userKey on 2017/4/13.
 */
public class RingResponse {
    public static final byte NO_ACTION_ORDER = 0;//没有活动命令
    public static final byte RING_ACTIVATE_STATE = 1;//激活绑定后 正常发数据态状
    public static final byte ACTIVATE_ORDER = 2;//脚环自检状态
    public static final byte LOGOUT_ORDER = 3;//登出休眠脚环成功
    public static final byte UPDATE_DISTANCE_ORDER = 4;//距离设置成功
    public static final byte INIT_2GNET_SUCCESS = 5;//脚环初始化成功
    public static final byte AUTO_LOGOUT=(byte) 0xF0;//自动休眠
   // public static final byte BING_DING=(byte)0xF1;//已被绑定
    public static final byte ACTIVATED=(byte)0xF1;//激活待绑定时测距 自动绑定

    public static final byte PARAMERT_ACTIVATED=(byte)0xF2;//测距（参数设置模式)
    public static final byte PARAMERT_LOGOUT=(byte)0xF3;//退出参数设置模式
    public static final byte SEND_ID_SUCCESS=(byte)0xF4;//发送手持机ID应答\

    public static final byte SEVER_IP=(byte)0xF5;//服务器参数
    public static final byte SEVER_IP_SET=(byte)0xF6;//服务器参数设置应答
    public static final byte ALARM_SOUND_SET=(byte)0x06;//报警声设置应答
    public static final byte SIM_NUMBER=(byte)0xF7;//SIM卡号
    public static final byte VERSION_NUMBER=(byte)0xF8;//版本号
    public static final byte PARAMETER_SET=(byte)0xF9;//参数设置模式应答



  /*  public static final byte INIT_2GNET_ERROR = 6;//2G模块初始化失败
    public static final byte INIT_GPS_SUCCESS = 7;//GPS初始化成功
    public static final byte INIT_GPS_ERROR = 8;//GPS初始化失败
    public static final byte INIT_UWB_SUCCESS = 9;//UWB自检
    public static final byte INIT_UWB_ERROR = 10;//UWB自检应答*/
    public static final byte RING_DEFAULT_STATE =(byte)0x0B;// 默认状态
    public static final byte CLOSE_ALARM_RESPONSE = 14;//关闭警报成功

    public static final byte OPEN_ALARM_RESPONSE = 16;//打开警报成功

    /**
     * 不是脚环给的应答是自己设置的
     */
    public static final byte SIM_ERROR = 12;
    public static final byte CLOSE_ALARM_FROM_SERVER = 15;//从服务器关闭警报

    private boolean isSuccess = false;
    private byte responseCode = 0;
    private String ringID = "";
    //处理脚环的命令
    public RingResponse(String paramString, byte paramByte, boolean paramBoolean) {
        this.ringID = paramString;
        this.responseCode = paramByte;
        this.isSuccess = paramBoolean;
    }
    //处理不是脚环的命令
    public RingResponse(byte paramByte, boolean paramBoolean) {
        this.responseCode = paramByte;
        this.isSuccess = paramBoolean;
    }

    public byte getResponseCode() {
        return this.responseCode;
    }

    public String getRingID() {
        return this.ringID;
    }

    public boolean isSuccess() {
        return this.isSuccess;
    }

    public void setResponseCode(byte paramByte) {
        this.responseCode = paramByte;
    }

    public void setRingID(String paramString) {
        this.ringID = paramString;
    }

    public void setSuccess(boolean paramBoolean) {
        this.isSuccess = paramBoolean;
    }

    public String toString() {
        return "[FootRing ID:" + this.ringID + ", responseCode:" + this.responseCode + ", isSuccess:" + isSuccess + "]";
    }
}
